@extends('layouts.master')

@section('title')
    商品管理——木投网商城管理后台
@stop

@section('app_css')
    <link href="/resource/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" type="text/css" href="/resource/css/style.css">
    <link rel="stylesheet" href="/resource/css/dataTables.bootstrap.css">
@stop

@section('app_js')
    <script src="/resource/js/jquery-1.11.3.min.js"></script>
    <script src="/resource/js/bootstrap.min.js"></script>
    <script src="/resource/js/jquery.twbsPagination.js"></script>
    <script src="/resource/js/date.js"></script>
    @stop

@section('content')
    @include('common.nav')
<div class="container-fluid">
    <div class="row" id="navLeft">
        @include('common.product_nav')
        <div class="col-lg-10">
            <div class="navbottom">
              <span>您的位置：</span>商品 > 商品管理
            </div>
            <div class="contentNav">
              <ul>
                <li>商品</li>
                <li class="btn btn-default active"><a href="/show_goods">所有商品</a></li>
                <li class="btn btn-default"><a href="/add_goods">商品添加</a></li>
                <li class="btn btn-default"><a href="">违规下架商品</a></li>
                <li class="btn btn-default"><a href="">等待审核</a></li>
                <li class="btn btn-default"><a href="">商品设置</a></li> 
              </ul>
            </div>
            <hr>
            <div class="contentMember">
              <form class="form-inline">
                <div class="form-group">
                  <label>商品名称</label>
                  <input type="text" class="form-control" placeholder="">
                </div>
                <div class="form-group">
                  <label>平台货号</label>
                  <input type="text" class="form-control" placeholder="">
                </div>
                <div class="form-group">
                  <label>分类</label>
                  <select class="form-control">
                    <option>请选择...</option>
                    <option>红木</option>
                    <option>原木</option>
                    <option>锯材</option>
                    <option>人造板</option>
                    <option>地板</option>
                    <option>家具</option>
                    <option>家装材料</option>
                    <option>建筑模板</option>
                    <option>林场</option>
                    <option>木皮</option>
                    <option>木制品</option>
                  </select>
                </div>
                <br/><br/>
                <div class="form-group">
                  <label>所属商品</label>
                  <input type="text" class="form-control" placeholder="">
                </div>
                <div class="form-group">
                  <label>品牌</label>
                  <input type="text" class="form-control" placeholder="">
                </div>
                <div class="form-group">
                  <label>上架</label>
                  <select class="form-control">
                    <option>请选择...</option>
                    <option>出售中</option>
                    <option>仓库中</option>
                    <option>违规下架</option>
                  </select>
                </div>
                <div class="form-group">
                  <label>等待审核</label>
                  <select class="form-control">
                    <option>请选择...</option>
                    <option>通过</option>
                    <option>未通过</option>
                    <option>等待审核</option> 
                  </select>
                </div>
                <button type="submit" class="btn btn-default">搜索</button>
              </form>
              <hr>
              <div class="tishi">
                <div class="tishiTitle">操作提示</div>
                <div class="tishiSpan">
                  <ul>
                    <li>上架，当商品处于非上架状态时，前台将不能浏览该商品，店主可控制商品上架状态</li>
                    <li>违规下架，当商品处于违规下架状态时，前台将不能购买该商品，只有管理员可控制商品违规下架状态，并且商品只有重新编辑后才能上架</li>
                  </ul>
                </div>
              </div>
              <table class="table table-striped table-bordered bootstrap-datatable datatable table-hover" id="example">
                <thead>
                  <tr>
                    <th></th>
                    <th>商品名称</th>
                    <th>商品货号</th>
                    <th>供货渠道</th>
                    <th>价格(元)</th>
                    <th>库存</th>
                    <th>等级</th>
                    <th>操作</th>
                  </tr>
                </thead>
                <tbody>
                @foreach($goods as $k => $good)
                  <tr>
                    <td><input type="checkbox" name="demo"></td>
                    <td>{{ $good->product_name }}</td>
                    <td>{{ $good->product_sn }}</td>
                    <td>{{ $good->channel }}</td>
                    <td>{{ $good->shop_price }}</td>
                    <td>{{ $good->stock }}</td>
                    <td>{{ $good->level }}</td>
                    <td><a href="/edit_goods?product_id={{ $good->product_id }}">编辑</a> | <a href="/delete_goods?product_id={{ $good->product_id }}">删除</a></td>
                  </tr>
                    @endforeach
                </tbody>
              </table>
            </div>
            {{ $goods->links() }}
        </div>
    </div>
</div>
@stop